<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>用户列表</title>
    <script src="../../../static/kaige/js/szload.js"></script>
</head>

<body>
    <div class="kaige-body" id="editpwdbox">

    </div>
    <script>
        load_init_js(function () {
            layui.config({
                base: szoapcpath + '/static/kaige/layuiextend/'
            }).use(['form', 'layer', 'element', 'kaige'], function () {
                var $ = layui.$, form = layui.form, element = layui.element, layer = layui.layer, kaige = layui.kaige;
                form.render();
                kaige.form({
                    opentype: 'dom',
                    box: 'editpwdbox',
                    url: "/sys.user/editpwd",
                    id: 'kaige',
                    callback: function (res) {
                        if (res.status) {
                            layer.msg('修改密码后需要重新登录，2秒后去登录页面', {
                                icon: 1,
                                time: 2000 //2秒关闭（如果不配置，默认是3秒）
                            }, function () {
                                top.location.href = szoapcpath + '/pages/login.html';
                            });
                        }
                    }
                });
            });
        });
    </script>
    <script type="text/html" id="kaige_form_html">
        <form class="layui-form layui-form-pane kaige-body-form" lay-filter="kaige_form_lay_filter">
            <div class="layui-form-item">
                <label class="layui-form-label">账号</label>
                <div class="layui-input-inline">
                    <input type="text" value="{{ d.username || '' }}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline">
                    <input type="text" value="{{ d.real_name || '' }}" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">原密码：</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" required lay-verify="required" placeholder="请输入当前密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">新密码：</label>
                <div class="layui-input-inline">
                    <input type="password" name="newPwd" required lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">确认密码：</label>
                <div class="layui-input-inline">
                    <input type="password" name="rePwd" required lay-verify="required" placeholder="确认新密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label" style="background-color:transparent;border-color: transparent;"></label>
                <div class="layui-input-inline">
                    <button class="layui-btn" lay-submit="" id="kaige_form_btn_save" lay-filter="kaige_form_btn_save">提交更改</button>
                </div>
            </div>
        </form>
    </script>
</body>

</html>